package net.zjitc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.zjitc.pojo.Goods;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;


public interface GoodsMapper extends BaseMapper<Goods> {
    @Update("update vueshop_goods set category_id=#{categoryId},name=#{name},price=#{price},picture=#{picture},stock=#{stock},spec=#{spec},description=#{description} where id=#{id}")
    public void update(Goods good);
    @Insert("insert into vueshop_goods(category_id,name,price,picture,stock,spec,description) values(#{categoryId},#{name},#{price},#{picture},#{stock},#{spec},#{description})")
    public void add(Goods good);

}
